<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Connecting to Firebird databases</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.pdo-firebird.html">Firebird (PDO)</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="ref.pdo-ibm.html">IBM (PDO)</a></div>
 <div class="up"><a href="ref.pdo-firebird.html">Firebird (PDO)</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="ref.pdo-firebird.connection" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">PDO_FIREBIRD DSN</h1>
    <p class="verinfo">(PECL PDO_FIREBIRD &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">PDO_FIREBIRD DSN</span> &mdash; <span class="dc-title">Connecting to Firebird databases</span></p>

   </div>

   <div class="refsect1 description" id="refsect1-ref.pdo-firebird.connection-description">
    <h3 class="title">说明</h3>
    <p class="para">
     The PDO_FIREBIRD Data Source Name (DSN) is composed of the following elements:
     <dl>

      
       <dt>
DSN prefix</dt>

       <dd>

        <p class="para">
        The DSN prefix is <strong class="userinput"><code>firebird:</code></strong>.
        </p>
       </dd>

      
      
       <dt>
<em>dbname</em></dt>

       <dd>

        <p class="para">
         The name of the database.
        </p>
       </dd>

      
      
       <dt>
<em>charset</em></dt>

       <dd>

        <p class="para">
         The character set.
        </p>
       </dd>

      
      
       <dt>
<em>role</em></dt>

       <dd>

        <p class="para">
         The SQL role name.
        </p>
       </dd>

      
     </dl>

    </p>
   </div>

   <div class="refsect1 examples" id="refsect1-ref.pdo-firebird.connection-examples">
    <h3 class="title">范例</h3>
    <p class="para">
     <div class="example" id="example-944">
      <p><strong>Example #1 PDO_FIREBIRD DSN example with path</strong></p>
      <div class="example-contents"><p>
       The following example shows a PDO_FIREBIRD DSN for connecting to
       Firebird databases:
       <div class="example-contents"><div class="cdata"><pre>
firebird:dbname=/path/to/DATABASE.FDB
</pre></div>
       </div>

      </p></div>
     </div>
     <div class="example" id="example-945">
      <p><strong>Example #2 PDO_FIREBIRD DSN example with port and path</strong></p>
      <div class="example-contents"><p>
       The following example shows a PDO_FIREBIRD DSN for connecting to
       a Firebird database using hostname port and path:
       <div class="example-contents"><div class="cdata"><pre>
firebird:dbname=hostname/port:/path/to/DATABASE.FDB
</pre></div>
       </div>

      </p></div>
     </div>
     <div class="example" id="example-946">
      <p><strong>Example #3 PDO_FIREBIRD DSN example with localhost and path to employee.fdb on Debian system</strong></p>
      <div class="example-contents"><p>
       The following example shows a PDO_FIREBIRD DSN for connecting to
       a Firebird database employee.fdb using localhost:
       <div class="example-contents"><div class="cdata"><pre>
firebird:dbname=localhost:/var/lib/firebird/2.5/data/employee.fdb
</pre></div>
       </div>

      </p></div>
     </div>
    </p>
   </div>

  </div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="ref.pdo-firebird.html">Firebird (PDO)</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="ref.pdo-ibm.html">IBM (PDO)</a></div>
 <div class="up"><a href="ref.pdo-firebird.html">Firebird (PDO)</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
